﻿using System;

class Program
{
    static void Main(string[] args)
    {
        int[] arr = new int[] { 4, 1, 1, 4, 2, 3, 4, 4, 1, 2, 4, 9, 3 };
        int maxCount = 1;
        int mostFreq = 0;
        for (int i = 0; i < arr.Length-1; i++)
        {
            int count = 1;
            for (int j = i + 1; j< arr.Length; j++)
            {
                if (arr[i] == arr[j])
                {
                    count++;
                }
            }
            if (count > maxCount)
            {
                maxCount = count;
                mostFreq = arr[i];
            }
        }
        if (maxCount > 1)
        {
            Console.Write(mostFreq);
            Console.WriteLine(" appears {0} times in the array", maxCount);
        }
        else
        {
            Console.WriteLine("All the numbers in the array are different");
        }
    }
}